#include "Committee.h"

std::ostream& operator<<( std::ostream& stream, const Committee &committee )
{
  return stream << 
    committee.id() << c_delm <<
    committee.aim() << std::endl;
}

std::istream& operator>>( std::istream& stream, Committee& committee )
{
  CsvRow row;
  stream >> row;
  if (row.empty())
    return stream;
  committee = Committee(row[0], row[1]);
  return stream;
}

Committee& Committee::operator=( const Committee& other )
{
  if (this == &other)
    return *this;
  m_id = other.m_id;
  m_aim = other.m_aim;
  return *this;
}

bool Committee::operator==( const Committee& other ) const
{
  return m_id == other.m_id && m_aim == other.m_aim;
}
